<#include "../common/_layout.html"/> <@head title="导出历史记录管理">
<style type="text/css">
.cll {
	background-color: #ddd;
}
</style>
</@head> <@layout menu='/redbaglog'>
<!-- Content Header (Page header) -->
<section class="content-header">
	<h1>${pageTitleBread.department!pageTitleBread.default!}</h1>
	<ol class="breadcrumb">
		<li><a href="javascript:void(0);" onclick="location.href='${ctx}${pageTitleBread.breadHomeMethod!}'">首页</a></li>
		<li class="active">${pageTitleBread.nowBread!}</li>
	</ol>
</section>

<!-- Main content -->
<section class="content">
	<div class="row">
		<div class="col-xs-12">
			<div class="box">
				<form action="${ctx}/redbaglog" id="listForm" method="post" role="form"
					class="form-inline">
					<div class="box-header">
						<h3 class="box-title">导出历史记录管理</h3>						
					</div>
					<div class="form-group">
							<label for="year">年度</label> <select id="year" name="year" class="form-control"
								style="width: 150px">
							</select>
						</div>
						<div class="form-group">
							<label for="month">月份</label> <select name="month" id="month" class="form-control"
								style="width: 150px">
								<option value="">全部</option>
								<option value="1"<#if month??&&month=="1">selected="selected"</#if>>一月</option>
								<option value="2"<#if month??&&month=="2">selected="selected"</#if>>二月</option>
								<option value="3"<#if month??&&month=="3">selected="selected"</#if>>三月</option>
								<option value="4"<#if month??&&month=="4">selected="selected"</#if>>四月</option>
								<option value="5"<#if month??&&month=="5">selected="selected"</#if>>五月</option>
								<option value="6"<#if month??&&month=="6">selected="selected"</#if>>六月</option>
								<option value="7"<#if month??&&month=="7">selected="selected"</#if>>七月</option>
								<option value="8"<#if month??&&month=="8">selected="selected"</#if>>八月</option>
								<option value="9"<#if month??&&month=="9">selected="selected"</#if>>九月</option>
								<option value="10"<#if month??&&month=="10">selected="selected"</#if>>十月</option>
								<option value="11"<#if month??&&month=="11">selected="selected"</#if>>十一月</option>
								<option value="12"<#if month??&&month=="12">selected="selected"</#if>>十二月</option>
							</select>
						</div>
						<button class="btn btn-sm btn-default" value="查询">搜索</button>
					<div class="box-body table-responsive no-padding">
						<button type="button" id="deleteButton" disabled="disabled"
							class="btn btn-default" onclick="deleteAll('${ctx}/redbaglog/delete')">删除
						</button>
						<table class="table table-hover">
							<tr class="info">
								<th title=""><input type="checkbox" id="allCheck"></th>
								<th title="最后一次导出的建议ID">最后一次导出的建议ID</th>
								<th title="导出总数">导出总数</th>
								<th title="状态">状态</th>
								<th title="时间">时间</th>
								<th>操作</th>

							</tr>
							<#list page.getList() as item>
							<tr>
								<td><input type="checkbox" name="ids" value="${item.id!}"></td>
								<td>${item.last_adv_id!}</td>
								<td>${item.total!}</td>
								<td><#if item.status??&&item.status==0>未发放</#if> <#if
									item.status??&&item.status==1>已发放</#if>
								<td>${item.create_time!}</td>
								<td><#if item.status??&&item.status==0>
									<button type="button" class="btn btn-info"
										onclick="location.href='${ctx}/complaintadvice/exportExcel?type=0&${item.search_params}'">重新下载
									</button>

									<button type="button" class="btn btn-info"
										onclick="location.href='${ctx}/redbaglog/ensure?id=${item.id}'">确认发放
									</button> </#if>
								</td>
							</tr>
							</#list>
						</table>
						<#if (page.list?size>0)> <#include "../common/pager.html"> </#if>
					</div>
				</form>
			</div>
		</div>
	</div>
</section>
</@layout> <@scripts>
<script type="text/javascript"
	src="${ctx}/adminlte/plugins/bootbox/bootbox.min.js"></script>
<script type="text/javascript" src="${ctx}/js/list.js"></script>
<script type="text/javascript"
	src="${ctx}/adminlte/plugins/moment/moment.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
    	var pre = moment().year()-1;
    	var now = moment().year();
    	var next = moment().year()+1;
    	var syear = ${year!.now?string['yyyy']};
    	var option = $("<option>").val(pre).text(pre);
    	if(pre==syear){
    		option.attr("selected",true);
    	}
    	var option1 = $("<option>").val(now).text(now);
    	if(now==syear){
    		option1.attr("selected",true);
    	}
    	var option2 = $("<option>").val(next).text(next);
    	if(next==syear){
    		option2.attr("selected",true);
    	}
    	$("#year").append(option).append(option1).append(option2);
    });
</script>
</@scripts>
